#!/bin/sh
HOSTNAME=`hostname`
ARGS=

while test "$1" != ""
do
  case "$1" in
    -sciop) ORBNameServicePort=${ORBNameServicePort=10000}
            export NameServiceIOR=${NameServiceIOR=corbaloc:sciop:$HOSTNAME:$ORBNameServicePort/NameService}
            ARGS="$ARGS -ORBEndpoint sciop:// ";;
    -sctp)  export FTEC_DETECTOR_TRANSPORT_PROTOCOL=sctp ;;
    -hb)    export FTEC_DETECTOR_TRANSPORT_PROTOCOL=sctp
            export FTEC_HEART_BEAT=$2
            shift;;
    -ami)   export FTEC_REPLCATION_STRATEGY=AMI;;
    -ns)    ORBNameServicePort=${ORBNameServicePort=10000}
            export NameServiceIOR=${NameServiceIOR=corbaloc:iiop:$2:$ORBNameServicePort/NameService};
            shift;;
      *)    ARGS="$ARGS $1";;
    esac 
    shift
done
echo $ARGS
cd ./Event_Service
./ftrt_eventservice $ARGS
